<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02变量和常量</title>
</head>
<body>
<script>
    var a = 10;
    var b = "hhhhhhh";
    var c = false;
    console.log(a,b,c);
    console.log(typeof a,typeof b,typeof c)// number string boolean

    a = "hello world";//可以修改变量类型
    console.log(a);
    a = true;
    var a = "我一定会回来的";//可以重新赋值
    console.log(a);

    let x = 1;
    console.log(x,typeof x);
    x = 6.21;
    console.log(x,typeof x);
    // let x = "hello world";//SyntaxError: 报错
    console.log(x,typeof x);

    const y = 1;
    console.log(y,typeof y);
    //y = 6.21;//报错 常量的值不允许被修改

</script>
</body>
</html>